package createPattern.factoryPattern.abstractFactory;

import createPattern.factoryPattern.abstractFactory.carProduct.Car;
import createPattern.factoryPattern.abstractFactory.factory.IFactory;
import createPattern.factoryPattern.abstractFactory.factory.factoryImp.BugattiFactory;
import createPattern.factoryPattern.abstractFactory.factory.factoryImp.PorscheFactory;
import createPattern.factoryPattern.abstractFactory.maintenanceProduct.Maintenance;

public class Test {
	public static void main(String args[]) {
		IFactory factory;

		factory = new BugattiFactory();
		Car jackCar = factory.getCar("Jack", "blue");
		jackCar.run();
		Maintenance bugattiService = factory.getMaintenance(18);
		bugattiService.service(jackCar);

		factory = new PorscheFactory();
		Car julyCar = factory.getCar("July", "red");
		julyCar.run();
		Maintenance porscheService = factory.getMaintenance(6);
		porscheService.service(julyCar);

	}
}
